﻿using System;
using Omniscient.Foundation.Data;
using Omniscient.TimeTracker.Data;

namespace Omniscient.TimeTracker.BusinessModel
{
    public delegate void NewTaskStartedEventHandler(object sender, EventArgs e);
    public delegate void StateChangedEventHandler(object sender, EventArgs e);

    public interface ITimeEntryManager
    {
        event NewTaskStartedEventHandler NewTaskStarted;
        event StateChangedEventHandler StateChanged;

        TimeEntry CurrentRunningTimeEntry { get; }
        bool HasRunningTask { get; }
        TimeEntry StartTask(Task task);
        TimeEntry StartTask(Task task, Category category);
        TimeEntry StartTask(Task task, string LastTimeEntryComments);
        TimeEntry StartTask(Task task, Category category, string LastTimeEntryComments);
        TimeEntry StopTask(string comments);
        TimeEntry StopTask();
        EntityList<TimeEntry> TimeEntries { get; }
    }
}
